#include <iostream>
#include <string>

using namespace std;

class my_class
{
private:
    int n;
    int * ptr;
public:
    my_class()
    {
        cout << "无参构造" << endl;
    }
    my_class(int n):n(n)
    {
        cout << "有参构造" << endl;
        ptr = new int(n);
    }
    ~my_class()
    {
        if (ptr != NULL)
        {
            delete ptr;
            cout << "析构释放成功" << endl;
            return;
        }
        cout << "析构释放失败" << endl;
    }
};

class student
{
private:
    // 成员子对象
    my_class c_1;
public:
    student(/* args */)
    {

    }
    student(int n):c_1(n)
    {

    }
    ~student()
    {

    }
};

int main(int argc, char const *argv[])
{
    student s1(10);
    
    return 0;
}
